import {lazy} from "react" // 路由懒加载的
let routerList = [
    {
        path:"/home",
        component: lazy(()=>import("../pages/home")),
        children:[
            {
                path:"/home/movie",
                component:lazy(()=>import("../pages/movie"))
            },
            {
                path:"/home/video",
                component:lazy(()=>import("../pages/video"))
            },
            {
                path:"/home/shortVideo",
                component:lazy(()=>import("../pages/shortVideo"))
            },
            {   
                path:'/home/small',
                component:lazy(()=>import("../pages/small"))

            },
            {
                from:"/home",
                to:"/home/movie"
            }
        ]
    },
    {
        path:"/my",
        component:lazy(()=>import("../pages/my"))
    },
    {
        path:"/login",
        component:lazy(()=>import("../pages/login"))
    },
    {
        path:"/detail/:id",
        component:lazy(()=>import("../pages/detail"))
    },
    {
        path:"/detail1",
        component:lazy(()=>import("../pages/detail1"))
    },
    {
        path:"/detail2",
        component:lazy(()=>import('../pages/detail2'))
    },
    {
        from:"/",
        to:"/home"
    }
]
export default routerList